#!/bin/sh

if [ -z "$MESSHOME" ]
then
	. ./messenv.sh
fi

uimodekey=`grep "^uimodekey " "$MESSHOME"/mess.ini | awk '{print $2}'`
idx=`grep -n "$uimodekey" uikeylst.tcl | cut -d: -f1`
if [ -z "$idx" ]
then
	echo 0
	exit 0
fi
idx=`expr $idx - 1`
echo $idx
